Fix MISRA Rule 5.3 Part 1
authorDaniel Boulby <[email protected]>
Fri, 4 May 2018 10:18:26 +0000 (11:18 +0100)
committerDaniel Boulby <[email protected]>
Tue, 12 Jun 2018 12:21:36 +0000 (13:21 +0100)
Conflict with function name and variable name within that function.
Change the name of the function from image_size to get_image_size
to remove conflict and make the function fit the normal project
naming convention.

Rule 5.3:  An identifier declared in an inner scope shall not
           hide an identifier declared in an outer scope

Fixed For:
    make LOG_LEVEL=50 PLAT=fvp

Change-Id: I1a63d2730113e2741fffa79730459c584b0224d7
Signed-off-by: Daniel Boulby <[email protected]>
common/bl_common.c
include/common/bl_common.h

index 6b979f64ae520755e08318ea5433679df351afbc..af51c07d513f9394e475ae9daf3c33a050384a39 100644 (file)
@@ -184,7 +184,7 @@ static void dump_load_info(uintptr_t image_load_addr,
 #endif /* LOAD_IMAGE_V2 */
 
 /* Generic function to return the size of an image */
-size_t image_size(unsigned int image_id)
+size_t get_image_size(unsigned int image_id)
 {
        uintptr_t dev_handle;
        uintptr_t image_handle;
index c7c748729c67552072029f49881bb0558266b66e..f64e6aee6085319f38ab7b8299d6262aa0003d91 100644 (file)
@@ -207,7 +207,7 @@ typedef struct bl31_params {
 /*******************************************************************************
  * Function & variable prototypes
  ******************************************************************************/
-size_t image_size(unsigned int image_id);
+size_t get_image_size(unsigned int image_id);
 
 int is_mem_free(uintptr_t free_base, size_t free_size,
                uintptr_t addr, size_t size);